package com.rchat.pocmini.global;

/**
 * 服务器对应的请求码和响应码
 * Created by itsdf07 on 2017/7/5 18:19.
 * E-Mail: 923255742@qq.com
 * GitHub: https://github.com/itsdf07
 */

public class HttpCodeGlobal {
    /*----------------- HTTP请求报文中的事物编号------------------*/
    public static final int REQ_CODE_1001 = 1001;//	应用检索新版本
    public static final int REQ_CODE_1011 = 1011;//	登录账号校验
    public static final int REQ_CODE_1012 = 1012;//	注册账号提交
    public static final int REQ_CODE_2000 = 2000;//	发送短信
    public static final int REQ_CODE_2001 = 2001;//	判断账号是否被注册
    public static final int REQ_CODE_2002 = 2002;//	忘记密码发送短信
    public static final int REQ_CODE_1014 = 1014;//找回账号提交
    public static final int REQ_CODE_1015 = 1015;//找回账号校验短信
    public static final int REQ_CODE_1016 = 1016;//查找未推送信息
    public static final int REQ_CODE_1017 = 1017;//更新答复、邀请之类的推送状态
    public static final int REQ_CODE_1018 = 1018;//密码更改
    public static final int REQ_CODE_1021 = 1021;//	创建群组
    public static final int REQ_CODE_1022 = 1022;//搜索群组
    public static final int REQ_CODE_1023 = 1023;//获取群组属性信息
    public static final int REQ_CODE_1024 = 1024;//邀请进入群组
    public static final int REQ_CODE_1025 = 1025;//申请加入群组
    public static final int REQ_CODE_1026 = 1026;//答复加入群组
    public static final int REQ_CODE_1027 = 1027;//群员退出群组
    public static final int REQ_CODE_1028 = 1028;//获取邀请加入群组的好友列表（不包含已经存在在群组中的好友）
    public static final int REQ_CODE_1029 = 1029;//根据groupId获取群组申请列表
    public static final int REQ_CODE_1221 = 1221;//获取群组成员
    public static final int REQ_CODE_1120 = 1120;//邀请进入群组推送
    public static final int REQ_CODE_1121 = 1121;//申请加入群组推送
    public static final int REQ_CODE_1122 = 1122;//答复加入群组推送
    public static final int REQ_CODE_1123 = 1123;//退出群组推送
    public static final int REQ_CODE_1124 = 1124;//踢出群组推送
    public static final int REQ_CODE_1125 = 1125;//删除群组推送
    public static final int REQ_CODE_1126 = 1126;//请求群组内拉人进行通话推送
    public static final int REQ_CODE_1127 = 1127;//答复群组内拉人进行通话推送

    public static final int REQ_CODE_1031 = 1031;//根据通讯录推荐好友
    public static final int REQ_CODE_1032 = 1032;//申请交友
    public static final int REQ_CODE_1033 = 1033;//答复交友
    public static final int REQ_CODE_1034 = 1034;//获取好友列表
    public static final int REQ_CODE_1035 = 1035;//搜索成员
    public static final int REQ_CODE_1036 = 1036;//修改昵称
    public static final int REQ_CODE_1037 = 1037;//删除好友
    public static final int REQ_CODE_1038 = 1038;//获取好友申请列表
    public static final int REQ_CODE_1039 = 1039;//添加好友备注（添加好友备注）
    public static final int REQ_CODE_1130 = 1130;//申请好友推送
    public static final int REQ_CODE_1131 = 1131;//答复好友推送
    public static final int REQ_CODE_1230 = 1230;//二维码扫描添加好友
    public static final int REQ_CODE_1231 = 1231;//获取用户属性
    public static final int REQ_CODE_1232 = 1232;//获取用户有效期
    public static final int REQ_CODE_1041 = 1041;//获取已绑定的蓝牙列表
    public static final int REQ_CODE_1042 = 1042;//绑定蓝牙
    public static final int REQ_CODE_1043 = 1043;//二维码激活（授权码）
    public static final int REQ_CODE_1044 = 1044;//解绑（蓝牙设备地址码）

    public static final int REQ_CODE_1051 = 1051;//微信支付预支付订单（统一下订单）
    public static final int REQ_CODE_1052 = 1052;//微信支付查询订单
    public static final int REQ_CODE_1053 = 1053;//获取价格定义表
    //无屏机组呼  单呼  全呼
    public static final int REQ_CODE_1061 = 1061;//发起组呼 全呼 单呼 推送
    public static final int REQ_CODE_1062 = 1062;//解散组呼 全呼 单呼 推送

    public static final int REQ_CODE_1063 = 1063;//查找组呼列表
    public static final int REQ_CODE_1064 = 1064;//查找组呼成员

    public static final int REQ_CODE_1222 = 1222;//修改群组名称
    public static final int REQ_CODE_1223 = 1223;//VIP会员到期保留的群组
    public static final int REQ_CODE_1224 = 1224;//位置信息上报
    public static final int REQ_CODE_1225 = 1225;//获取频道成员位置信息


    /*----------------- HTTP应答报文中的响应码Code------------------*/
    public static final int RES_CODE_200 = 200;//（成功）服务器已成功处理了请求
    public static final int RES_CODE_300 = 300;//（失败） 格式不正确
    public static final int RES_CODE_301 = 301;//（失败）缺少code字段
    public static final int RES_CODE_302 = 302;//（失败）缺少data结构
    public static final int RES_CODE_303 = 303;//（失败）数据内容校验错误
    public static final int RES_CODE_304 = 304;//（失败）code不正确
    public static final int RES_CODE_305 = 305;//（失败）缺少账号字段
    public static final int RES_CODE_306 = 306;//（失败）缺少密码字段
    public static final int RES_CODE_307 = 307;//（失败）缺少验证码字段
    public static final int RES_CODE_308 = 308;//（失败）缺少申请人字段
    public static final int RES_CODE_309 = 309;//（失败）缺少被申请人字段
    public static final int RES_CODE_310 = 310;//（失败）缺少phones结构
    public static final int RES_CODE_311 = 311;//（失败）缺少手机号码
    public static final int RES_CODE_312 = 312;//（失败）缺少groupId字段
    public static final int RES_CODE_313 = 313;//（失败）缺少userName字段
    public static final int RES_CODE_314 = 314;//（失败）缺少groupName字段
    public static final int RES_CODE_315 = 315;//（失败）缺少users结构
    public static final int RES_CODE_316 = 316;//（失败）缺少user字段
    public static final int RES_CODE_317 = 317;//（失败）缺少蓝牙mac字段
    public static final int RES_CODE_318 = 318;//（失败）缺少display字段
    public static final int RES_CODE_319 = 319;//（失败）缺少搜索条件
    public static final int RES_CODE_320 = 320;//（失败）缺少goodsName字段
    public static final int RES_CODE_321 = 321;//（失败）缺少price字段
    public static final int RES_CODE_322 = 322;//（失败）缺少tradeType字段
    public static final int RES_CODE_323 = 323;//（失败）缺少tradeTypeId字段
    public static final int RES_CODE_324 = 324;//（失败）缺少旧密码字段
    public static final int RES_CODE_325 = 325;//（失败）缺少新密码字段
    public static final int RES_CODE_400 = 400;//（失败）密码错误
    public static final int RES_CODE_401 = 401;//（失败）账号有效期已到
    public static final int RES_CODE_402 = 402;//（失败）验证码错误
    public static final int RES_CODE_403 = 403;//（失败）该手机已注册
    public static final int RES_CODE_404 = 404;//（失败）无法添加申请好友数据
    public static final int RES_CODE_405 = 405;//（失败）更新答复申请好友状态失败
    public static final int RES_CODE_406 = 406;//（失败）该账号还未添加好友
    public static final int RES_CODE_407 = 407;//（失败）无法添加申请群组数据
    public static final int RES_CODE_408 = 408;//（失败）没有该群组数据
    public static final int RES_CODE_409 = 409;//（失败）更新答复申请群组状态失败
    public static final int RES_CODE_410 = 410;//（失败）群组创建失败
    public static final int RES_CODE_411 = 411;//（失败）没有与之匹配的群组信息
    public static final int RES_CODE_412 = 412;//（失败）邀请的成员不存在
    public static final int RES_CODE_413 = 413;//（失败）该成员已经在该群组
    public static final int RES_CODE_414 = 414;//（失败）邀请的groupid不存在
    public static final int RES_CODE_415 = 415;//（失败）没有与该手机匹配的蓝牙耳机
    public static final int RES_CODE_416 = 416;//（失败）手机与蓝牙绑定失败
    public static final int RES_CODE_417 = 417;//（失败）通讯录中没有可推荐的好友
    public static final int RES_CODE_418 = 418;//（失败）账号错误
    public static final int RES_CODE_419 = 419;//（失败）手机号码不存在
    public static final int RES_CODE_420 = 420;//（失败）搜索的好友不存在
    public static final int RES_CODE_421 = 421;//（失败）申请的群组已经存在该成员
    public static final int RES_CODE_422 = 422;//（失败）申请的好友已经是自己的好友
    public static final int RES_CODE_423 = 423;//（失败）该账号已经被注册
    public static final int RES_CODE_424 = 424;//（失败）蓝牙绑定插入失败
    public static final int RES_CODE_425 = 425;//（失败）蓝牙地址已经被绑定
    public static final int RES_CODE_426 = 426;//（失败）蓝牙列表中不存在此蓝牙mac
    public static final int RES_CODE_427 = 427;//（失败）该蓝牙已经被绑定过
    public static final int RES_CODE_428 = 428;//（失败）暂时还没有订单
    public static final int RES_CODE_429 = 429;//（失败）手机号码错误或短信格式错误
    public static final int RES_CODE_430 = 430;//（失败）时间超时，验证码无效
    public static final int RES_CODE_431 = 431;//（失败）验证码错误
    public static final int RES_CODE_432 = 432;//（失败）验证码发送失败
    public static final int RES_CODE_433 = 433;//（失败）没有申请该群组的消息
    public static final int RES_CODE_434 = 434;//（失败）没有可邀请的好友
    public static final int RES_CODE_435 = 435;//（失败）该账号不存在
    public static final int RES_CODE_436 = 436;//（失败）旧密码错误
    public static final int RES_CODE_437 = 437;//（失败）群组名称不能超过69个字
    public static final int RES_CODE_438 = 438;//（失败）昵称不能超过32个字
    public static final int RES_CODE_439 = 439;//（失败）密码长度不能少于6位
    public static final int RES_CODE_440 = 440;//（失败）群组数量超过限制，无法创建
    public static final int RES_CODE_441 = 441;//（失败）该手机未发送验证码
    public static final int RES_CODE_442 = 442;//（失败）群主不能退出群组
    public static final int RES_CODE_449 = 449;//（失败）授权码不存在(蓝牙设备激活码)
    public static final int RES_CODE_451 = 451;//（失败）蓝牙mac地址不存在

    /**
     * 接口版本：事务码唯一，接口有相同，
     *
     * @param requestCode 事务码
     * @return
     */
    public static String getUrlVersion(int requestCode) {
        String version = "1.0";
        switch (requestCode) {
            case REQ_CODE_1001:
                version = "1.0";
                break;
            case REQ_CODE_1011:
                version = "1.0";
                break;
            case REQ_CODE_1012:
                version = "1.0";
                break;
            case REQ_CODE_2000:
                version = "1.0";
                break;
            case REQ_CODE_2001:
                version = "1.0";
                break;
            case REQ_CODE_2002:
                version = "1.0";
                break;
            case REQ_CODE_1014:
                version = "1.0";
                break;
            case REQ_CODE_1016:
                version = "1.0";
                break;
            case REQ_CODE_1018:
                version = "1.0";
                break;
            case REQ_CODE_1021:
                version = "1.0";
                break;
            case REQ_CODE_1022:
                version = "1.0";
                break;
            case REQ_CODE_1024:
                version = "1.0";
                break;
            case REQ_CODE_1025:
                version = "1.0";
                break;
            case REQ_CODE_1028:
                version = "1.0";
                break;
            case REQ_CODE_1035:
                version = "1.0";
                break;
            case REQ_CODE_1230:
                version = "1.0";
                break;
            case REQ_CODE_1032:
                version = "1.0";
                break;
            case REQ_CODE_1027:
                version = "1.0";
                break;
            case REQ_CODE_1029:
                version = "1.0";
                break;
            case REQ_CODE_1036:
                version = "1.0";
                break;
            case REQ_CODE_1222:
                version = "1.0";
                break;
            case REQ_CODE_1033:
                version = "1.0";
                break;
            case REQ_CODE_1034:
                version = "1.0";
                break;
            case REQ_CODE_1037:
                version = "1.0";
                break;
            case REQ_CODE_1038:
                version = "1.0";
                break;
            case REQ_CODE_1051:
                version = "1.0";
                break;
            case REQ_CODE_1026:
                version = "1.0";
                break;
            case REQ_CODE_1052:
                version = "1.0";
                break;
            case REQ_CODE_1053:
                version = "1.0";
                break;
            case REQ_CODE_1221:
                version = "1.0";
                break;
            case REQ_CODE_1017:
                version = "1.0";
                break;
            case REQ_CODE_1223:
                version = "1.0";
                break;
            case REQ_CODE_1225:
                version = "1.0";
                break;
            case REQ_CODE_1224:
                version = "1.0";
                break;
            case REQ_CODE_1043:
                version = "1.0";
                break;
        }
        return version;
    }
}
